from django.test import TestCase
from loguru import logger
from asset.utils.mongoDBManage import get_mongo_collection,get_mongo_database
# Create your tests here.
id = 10
logger.debug(f"通过{10}查询用户")
database = get_mongo_database('pcttTest')
user_collection = database['user']

    # user = list(user_collection.find({'id':id}, {'_id': 0}))
user = user_collection.find_one({'id':id})
logger.debug(f'查询到用户id{id}的用户{user}')